import 'package:flutter_cwhisky/generated/json/base/json_convert_content.dart';
import 'package:flutter_cwhisky/bean/classify_entity.dart';

ClassifyEntity $ClassifyEntityFromJson(Map<String, dynamic> json) {
	final ClassifyEntity classifyEntity = ClassifyEntity();
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		classifyEntity.code = code;
	}
	final String? message = jsonConvert.convert<String>(json['message']);
	if (message != null) {
		classifyEntity.message = message;
	}
	final List<ClassifyData>? data = jsonConvert.convertListNotNull<ClassifyData>(json['data']);
	if (data != null) {
		classifyEntity.data = data;
	}
	final int? currentTime = jsonConvert.convert<int>(json['currentTime']);
	if (currentTime != null) {
		classifyEntity.currentTime = currentTime;
	}
	return classifyEntity;
}

Map<String, dynamic> $ClassifyEntityToJson(ClassifyEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['message'] = entity.message;
	data['data'] =  entity.data?.map((v) => v.toJson()).toList();
	data['currentTime'] = entity.currentTime;
	return data;
}

ClassifyData $ClassifyDataFromJson(Map<String, dynamic> json) {
	final ClassifyData classifyData = ClassifyData();
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		classifyData.code = code;
	}
	final String? image = jsonConvert.convert<String>(json['image']);
	if (image != null) {
		classifyData.image = image;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		classifyData.name = name;
	}
	final String? zhName = jsonConvert.convert<String>(json['zhName']);
	if (zhName != null) {
		classifyData.zhName = zhName;
	}
	final int? reorder = jsonConvert.convert<int>(json['reorder']);
	if (reorder != null) {
		classifyData.reorder = reorder;
	}
	final String? subIcon = jsonConvert.convert<String>(json['subIcon']);
	if (subIcon != null) {
		classifyData.subIcon = subIcon;
	}
	final String? subName = jsonConvert.convert<String>(json['subName']);
	if (subName != null) {
		classifyData.subName = subName;
	}
	final dynamic goods = jsonConvert.convert<dynamic>(json['goods']);
	if (goods != null) {
		classifyData.goods = goods;
	}
	final int? brandSize = jsonConvert.convert<int>(json['brandSize']);
	if (brandSize != null) {
		classifyData.brandSize = brandSize;
	}
	final dynamic brandImage = jsonConvert.convert<dynamic>(json['brandImage']);
	if (brandImage != null) {
		classifyData.brandImage = brandImage;
	}
	final String? gif = jsonConvert.convert<String>(json['gif']);
	if (gif != null) {
		classifyData.gif = gif;
	}
	final List<ClassifyData>? children = jsonConvert.convertListNotNull<ClassifyData>(json['children']);
	if (children != null) {
		classifyData.children = children;
	}
	return classifyData;
}

Map<String, dynamic> $ClassifyDataToJson(ClassifyData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['image'] = entity.image;
	data['name'] = entity.name;
	data['zhName'] = entity.zhName;
	data['reorder'] = entity.reorder;
	data['subIcon'] = entity.subIcon;
	data['subName'] = entity.subName;
	data['goods'] = entity.goods;
	data['brandSize'] = entity.brandSize;
	data['brandImage'] = entity.brandImage;
	data['gif'] = entity.gif;
	data['children'] =  entity.children;
	return data;
}